package chapter67;

import java.util.Scanner;

public class TestStudentsInsertAndFind {
	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		StudentsInsertAndFind stuInsertAndFind = new StudentsInsertAndFind();
		String answer = "";
		
		do{
			//增加学员
			Students stu = new Students();
			System.out.print("请输入学员姓名：");
			stu.studentName = input.next();
			System.out.print("请输入学员年龄：");
			stu.studentAge = input.nextInt();
			System.out.print("请输入学员班级：");
			stu.classes = input.nextInt();
			System.out.print("请输入学员兴趣：");
			stu.hobby = input.next();
			stuInsertAndFind.addStudent(stu);
			System.out.print("请问是否继续增加？(y/n)");
			answer = input.next();
		}while(answer.equals("y"));
		
		stuInsertAndFind.findStudent(2,4,"tim");
		stuInsertAndFind.showStuInfo();
	}
}
